<div class="j-root-report-list">
    <div class="con-common-line">
        <div class="con-common-max-min">
            <span class="btn-has-icon btn-has-icon-new c-p j-add-data-sources-group">新建数据源组</span>
            <span class="btn-has-icon btn-has-icon-new c-p j-add-data-sources">新建数据源</span>
        </div>
    </div>
    <div class="con-report-list con-common-max-min">
        <table cellspacing="0">
            <thead>
            <tr>
                <!--<th class="report-index">序号</th>-->
                <th class="report-name">数据源名称</th>
                <th class="data-sources-btns">操作按钮</th>
            </tr>
            </thead>
            <tbody class="j-data-sources-tbody">
            {{each dataSourcesGroupList as $dsGroup index}}
                <tr class="report-line j-root-line" data-id="{{$dsGroup.id}}">
                    <!--<td>-->
                        <!--{{index + 1}}-->
                    <!--</td>-->
                    <td>
                        <label class="ellipsis" title="{{$dsGroup.name}}">{{$dsGroup.name}}</label>
                    </td>
                    <td>
                        <span class="btn-has-icon btn-has-icon-edit c-p j-edit-data-sources-group">编辑</span>
                        <span class="btn-has-icon btn-has-icon-delete c-p j-del-data-sources-group">删除</span>
                    </td>
                </tr>
                {{each $dsGroup.dsList as $ds}}
                <tr class="report-line j-root-line" data-id="{{$ds.id}}">
                    <!--<td>-->
                        <!--{{index + 1}}-->
                    <!--</td>-->
                    <td>
                        <div class="data-source-item-name">
                            <input type="radio" id="input-{{$ds.id}}" class="j-input-data-sources" name="{{$dsGroup.id}}" {{if $dsGroup.active === $ds.id}}checked="checked"{{/if}}>
                            <label class="ellipsis" title="{{$ds.name}}" for="input-{{$ds.id}}">{{$ds.name}}</label>
                        </div>

                    </td>
                    <td>
                        <span class="btn-has-icon btn-has-icon-edit c-p j-edit-data-sources">编辑</span>
                        <span class="btn-has-icon btn-has-icon-delete c-p j-delete-data-sources">删除</span>
                    </td>
                </tr>
                {{/each}}
            {{/each}}
            </tbody>
        </table>
        {{if dataSourcesGroupList.length == 0}}
        <div class="empty-data ta-c">暂无数据</div>
        {{/if}}
    </div>
</div>